﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ToolRental.Model
{
    [Table("Orders")]
    public class Order
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Required]
        [Display(Name = "Előfoglalás időpontja")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd hh:mm}")]
        public DateTime StartDate { get; set; }

        [Required]
        [Display(Name = "Felhasználó")]
        public int UserId { get; set; }
        public virtual UserProfile User { get; set; }

        [Required]
        [Display(Name = "Készülék típusa")]
        public int ToolTypeId { get; set; }
        public virtual ToolType Type { get; set; }

        [NotMapped]
        public string BrandName { get; set; }

        [NotMapped]
        public string TypeName { get; set; }

        [NotMapped]
        public string UserName { get; set; }

        [NotMapped]
        public bool IsChecked { get; set; }
    }
}
